The present invention is generally related to the field of software database management and, more particularly, is related to a system and method for synchronizing databases.
Technology has become pervasive in nearly all aspects of society. For example, the explosion in digital computing devices has changed the way people live and work. Personal computers have become common place in homes and in businesses. This computer technology has opened new avenues of communications such as email and other data communications that has provided unprecedented availability to information, for example, on the world wide web (WWW) of the Internet. Also, in the workplace computer technology has facilitated telecommuting and other conveniences where employees may work at home and have full access to office computer systems, etc.
With current mobility of systems, situations arise in which the same information, such as records in a database, is stored in two different places. The database may be subject to change in both places. This can create a problem in that different changes can be made to the database in the different locations, resulting in two different databases that no longer hold the same information. This is problematic when it is desirable that the database remain in a single consistent form in both locations.
In light of the foregoing, a system and method are provided for maintaining a database in a primary device and in a secondary device. In one embodiment, the method broadly comprises the step of determining a need for a merger of a first database maintained in the primary device and a second database maintained in the secondary device, the first and second databases being derived from a common database. The method also includes the steps of merging the first database and the second database, resulting in a merged database and assigning a sequence identifier to the merged database. Finally the present method includes the step of synchronizing the merged database in the primary and secondary devices.
In another embodiment, the present invention provides for a primary system located in a primary device for maintaining a database in the primary device and in the secondary device. The primary system includes a processor electrically coupled to a local interface and a memory electrically coupled to the local interface, where the local interface may be, for example, a data bus and accompanying control bus. The primary system also includes primary synchronization logic stored on the memory and executed by the processor. The primary synchronization logic comprises logic to determine a need for a merger of a first database maintained in the primary device and a second database maintained in the secondary device, where the first and second databases are derived from a common database. The primary synchronization logic also includes logic to merge the first and second databases, resulting in a merged database, logic to assign a sequence identifier to the merged database, and logic to synchronize the merged database in the primary and secondary devices.
The primary device operates in conjunction with the secondary device to maintain the database in both devices. Thus, according to another embodiment, the present invention provides for a secondary system in a secondary device that interacts with the primary system in the primary device. The secondary system in the secondary device includes a processor electrically coupled to a local interface and a memory electrically coupled to the local interface. The secondary system also includes a secondary synchronization logic stored on the memory and executed by the processor. The secondary synchronization logic includes logic to receive and store a second database from the primary device, the second database being identical to a first database stored in the primary device. The secondary synchronization logic also comprises logic to receive and store a sequence identifier from the primary device, the sequence identifier being associated with the second database, logic to maintain an alteration status of the second database, and logic to transmit the alteration status of the second database to the primary device.
The present invention provides a distinct advantage in that it is quite robust, maintaining synchronization between the first and second databases despite breakdowns in data communications, etc.